-
Notifications
You must be signed in to change notification settings - Fork 69
ptrace #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ptrace #129
Conversation
9412aa5 to
51e39b3
Compare
Fix current task double-borrow bug when exiting with a signal.
Make it such that when a ptrace event is hit: - The current regset is saved in the ptrace state. - The current task is put to sleep. - Arrange for a SIGCHLD to be set to the parent. - Notify any waiters with the appopriate signal.
handle `PTRACE_CONT` and `PTRACE_SYSCALL` operations.
Add option definitions `PTRACE_O_*` and change the ptrace state depdening upon which options are set in the call.
When a new child stops due to a stoppable-signal after PTRACE_TRACEME, send a SIGSTOP with a `PTRACE_EVENT_STOP`.
Add a function that allows an owned page to be atomically obtained from a new process.
We currently union the UNMASKABLE_SIGNALS set with the new signal mask. This does the complete opposite of what we wnat, we want to *remove* those signals from the newly computed signal mask. This patch removes the UNMASKABLE_SIGNALS set from any newly computed signal mask.
Implement the `sys_process_vm_readv` syscall.
If a SIGKILL has been received, ensure all sleepy tasks are set to runnable so that they can action the signal.
If a task has called one of `sys_exit` or `sys_exit_group`, don't follow the standard syscall exit path. Since the task is dead and it will never be rescheduled, there's no point in processing the result of sys_exit.
Add ptrace events for the exit family of syscalls.
If the calling process has no children and no pending exit events to handle, return ECHILD instead of waiting forever.
|
@arihant2math Okay, this now implements of enough ptrace logic to make strace work in moss! This also required the ability to get pages from another address space into the tracer for syscall arg decoding. I added the I've also attached an strace binary to this comment so people have have a play. |
arihant2math
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
No description provided.